### Eclipse Workspace Patch 1.0 #P ofbiz-trunk Index: specialpurpose/webpos/widget/PaymentScreens.xml =================================================================== --- specialpurpose/webpos/widget/PaymentScreens.xml (revision 1486308) +++ specialpurpose/webpos/widget/PaymentScreens.xml (working copy) @@ -34,6 +34,19 @@ + +
+ + + + + + + + +
+
+
Index: specialpurpose/webpos/webapp/webpos/images/webpos.css =================================================================== --- specialpurpose/webpos/webapp/webpos/images/webpos.css (revision 1486308) +++ specialpurpose/webpos/webapp/webpos/images/webpos.css (working copy) @@ -58,6 +58,7 @@ .pos-cart-odd { background-color: white; overflow: auto; + vertical-align: top; } .pos-cart-odd:hover { background-color: #FFFCCF; @@ -66,6 +67,7 @@ .pos-cart-even { background-color: #eeeeee; overflow: auto; + vertical-align: top; } .pos-cart-even:hover { background-color: #FFFCCF; @@ -247,7 +249,7 @@ #SearchSalesRepsList { border: 1px solid #0099CC; overflow: auto; - height: 120px; + height: 110px; } #SearchSalesReps { height: 110px; @@ -271,7 +273,7 @@ background-color: #fece2f; } #CenterBar { - margin-top: 33px; + margin-top: 15px; height: auto; } .leftCenterBar { @@ -287,6 +289,10 @@ .centerCenterBar { margin-left: 24em; margin-right: 24em; + padding-top: 1px; + padding-left: 2px; + padding-right: 2px; + padding-bottom: 1px; width: auto; } #CartHeader { @@ -294,16 +300,18 @@ width: 100%; } #Cart { - height: 460px; + height: 280px; width: 100%; } .basic-table .CartHead { height: 30px; } .basic-table .CartBody { - height: 400px; + height: 220px; overflow-x: hidden; - overflow-y: auto; + overflow-y: scroll; + vertical-align: top; + } .basic-table .CartFoot { height: 30px; Index: specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl =================================================================== --- specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl (revision 1486308) +++ specialpurpose/webpos/webapp/webpos/cart/ShowCart.ftl (working copy) @@ -24,11 +24,13 @@ + + @@ -104,11 +106,7 @@ <#else> <#assign parentProductId = cartLine.getProductId()/> - <#assign smallImageUrl = Static["org.ofbiz.product.product.ProductContentWrapper"].getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL", locale, dispatcher)?if_exists> - <#if !smallImageUrl?string?has_content><#assign smallImageUrl = "/images/defaultImage.jpg"> - <#if smallImageUrl?string?has_content> - - + <#-- end code to display a small image of the product --> ${cartLine.getProductId()} - ${cartLine.getName()?if_exists} : ${cartLine.getDescription()?if_exists} <#else> Index: specialpurpose/webpos/webapp/webpos/images/js/Common.js =================================================================== --- specialpurpose/webpos/webapp/webpos/images/js/Common.js (revision 1486308) +++ specialpurpose/webpos/webapp/webpos/images/js/Common.js (working copy) @@ -128,6 +128,7 @@ jQuery('#payCheck').hide(); jQuery('#payGiftCard').hide(); jQuery('#payCreditCard').hide(); + jQuery('#paPin').hide(); jQuery('#openTerminal').hide(); jQuery('#closeTerminal').hide(); jQuery('#paidOutAndIn').hide(); Index: specialpurpose/webpos/webapp/webpos/images/js/PayPin.js =================================================================== --- specialpurpose/webpos/webapp/webpos/images/js/PayPin.js (revision 0) +++ specialpurpose/webpos/webapp/webpos/images/js/PayPin.js (revision 0) @@ -0,0 +1,99 @@ +jQuery(document).ready(function() { + jQuery('#removePinTotalPaid').click(function(event) { + pleaseWait('Y'); + var param = 'clearPin=Y&clearCheck=N&clearGift=N&clearCredit=N'; + jQuery.ajax({url: 'ClearPayment', + data: param, + type: 'post', + async: false, + success: function(data) { + getResultOfPinClearPayment(data); + }, + error: function(data) { + getResultOfPinClearPayment(data); + } + }); + pleaseWait('N'); + productToSearchFocus(); + return false; + }); + + jQuery('#amoutPin').keypress(function(event) { + code = event.keyCode ? event.keyCode : event.which; + if (code.toString() == 13) { + payPinConfirm(); + return false; + } + if (code.toString() == 27) { + productToSearchFocus(); + return false; + } + }); + + jQuery('#payPinConfirm').click(function(event) { + payPinConfirm(); + return false; + }); + + jQuery('#payPinCancel').click(function(event) { + productToSearchFocus(); + return false; + }); +}); + +function payPinConfirm() { + pleaseWait('Y'); + var param = 'amoutPin=' + jQuery('#amoutPin').val(); + jQuery.ajax({url: 'PayPin', + data: param, + type: 'post', + async: false, + success: function(data) { + getResultOfPayPin(data); + }, + error: function(data) { + getResultOfPayPin(data); + } + }); + pleaseWait('N'); +} + +function payPin(cleanErrors) { + if (cleanErrors == undefined) { + cleanErrors = "Y"; + } + if (cleanErrors == "Y") { + hideOverlayDiv(); + jQuery('#payPinFormServerError').html(""); + jQuery('#amoutPin').val(""); + } + jQuery('#cashTotalDue').html(jQuery('#totalDueFormatted').val()); + jQuery('#cashTotalPaid').html(jQuery('#totalPinFormatted').val()); + jQuery('#payPin').show(); + jQuery('#amoutPin').focus(); + return false; +} + +function getResultOfPayPin(data) { + var serverError = getServerError(data); + if (serverError != "") { + jQuery('#payPinFormServerError').html(serverError); + payPin('N'); + } else { + clearErrorMessages(); + updateCart(); + productToSearchFocus(); + } +} + +function getResultOfPinClearPayment(data) { + var serverError = getServerError(data); + if (serverError != "") { + jQuery('#errors').fadeIn('slow', function() { + jQuery('#errors').html(serverError); + }); + } else { + clearErrorMessages(); + updateCart(); + } +} \ No newline at end of file Index: specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml =================================================================== --- specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml (revision 1486308) +++ specialpurpose/webpos/webapp/webpos/WEB-INF/controller.xml (working copy) @@ -371,6 +371,13 @@ + + + + + + + Index: specialpurpose/webpos/config/WebPosUiLabels.xml =================================================================== --- specialpurpose/webpos/config/WebPosUiLabels.xml (revision 1486308) +++ specialpurpose/webpos/config/WebPosUiLabels.xml (working copy) @@ -798,63 +798,73 @@ PRODUCT SEARCH RICERCA PRODOTTO 製品検索 + PRODUCT Zoeken 产品搜索 PARTY SEARCH RICERCA SOGGETTO 取引先検索 + KLANT Zoeken 会员搜索 PAY CASH PAGA IN CONTANTI 現金支払 + CONTANT 付现金 PAY CHECK PAGA CON ASSEGNO 小切手支払 + CHEQUE 付支票 + Pay Pin + PIN / CHIP + + PAY GIFT CARD PAGA C.REGALO ギフトカード支払 + CADEAUBON 付礼品卡 - + PAY BY CC PAGA C.CREDITO カード支払 + CREDIT CARD 付信用卡 - + CHECKOUT CHECKOUT チェックアウト 结账 - + CHANGE QUANTITY CAMBIA QUANTITA' 数量変更 修改数量 - + ADD QUANTITY AGGIUNGI QUANTITA' 数量加算 增加数量 - + SUBTRACT QUANTITY SOTTRAI QUANTITA' 数量減算 减少数量 - + EMPTY CART SVUOTA CARRELLO 空の買い物かご @@ -895,6 +905,7 @@ Total Totale 合計 + Totaal 购物车合计 @@ -907,12 +918,14 @@ Total Promotions Totale promozioni プロモーション合計 + Totaal PROMO 促销合计 Total Sales Tax Totale tasse 消費税合計 + Totaal BTW 营业税合计 @@ -926,6 +939,7 @@ N° de transaction Transazione トランザクションID + Transactie # 交易标识 @@ -933,6 +947,7 @@ Montant dû Totale dovuto 請求合計 + VERSCHULDIGD 全部应付 @@ -945,6 +960,7 @@ Total Paid Totale pagato 全額支払済 + Totaal BETAALD 已付合计 Index: specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy =================================================================== --- specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy (revision 1486308) +++ specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy (working copy) @@ -45,6 +45,7 @@ } context.cashAmount = BigDecimal.ZERO; +context.pinAmount = BigDecimal.ZERO; context.checkAmount = BigDecimal.ZERO; context.giftAmount = BigDecimal.ZERO; context.creditAmount = BigDecimal.ZERO; @@ -61,6 +62,9 @@ if ("CASH".equals(paymentInfo.paymentMethodTypeId)) { context.cashAmount = new BigDecimal((context.cashAmount).add(amount)); } + else if ("PIN".equals(paymentInfo.paymentMethodTypeId)) { + context.pinAmount = new BigDecimal((context.pinAmount).add(amount)); + } else if ("PERSONAL_CHECK".equals(paymentInfo.paymentMethodTypeId)) { context.checkAmount = new BigDecimal((context.checkAmount).add(amount)); } Index: specialpurpose/webpos/widget/CommonScreens.xml =================================================================== --- specialpurpose/webpos/widget/CommonScreens.xml (revision 1486308) +++ specialpurpose/webpos/widget/CommonScreens.xml (working copy) @@ -190,6 +190,7 @@ + Index: specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl =================================================================== --- specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl (revision 1486308) +++ specialpurpose/webpos/webapp/webpos/shortcuts/Shortcuts.ftl (working copy) @@ -28,17 +28,19 @@